Optimal. Leaf size=57 \[ -\frac {a (i A+B)}{4 c^4 f (i+\tan (e+f x))^4}-\frac {i a B}{3 c^4 f (i+\tan (e+f x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3669, 45}
\begin {gather*} -\frac {a (B+i A)}{4 c^4 f (\tan (e+f x)+i)^4}-\frac {i a B}{3 c^4 f (\tan (e+f x)+i)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^4} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(c-i c x)^5} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {i A+B}{c^5 (i+x)^5}+\frac {i B}{c^5 (i+x)^4}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {a (i A+B)}{4 c^4 f (i+\tan (e+f x))^4}-\frac {i a B}{3 c^4 f (i+\tan (e+f x))^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.81, size = 97, normalized size = 1.70 \begin {gather*} \frac {a (2 (-15 i A+B) \cos (e+f x)+3 (-5 i A+3 B) \cos (3 (e+f x))-(3 A+5 i B) (2 \sin (e+f x)+3 \sin (3 (e+f x)))) (\cos (5 (e+f x))+i \sin (5 (e+f x)))}{192 c^4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 44, normalized size = 0.77
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {i A +B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {i B}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}\right )}{f \,c^{4}}\) | \(44\) |
default | \(\frac {a \left (-\frac {i A +B}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {i B}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}\right )}{f \,c^{4}}\) | \(44\) |
risch | \(-\frac {a \,{\mathrm e}^{8 i \left (f x +e \right )} B}{64 c^{4} f}-\frac {i a \,{\mathrm e}^{8 i \left (f x +e \right )} A}{64 c^{4} f}-\frac {{\mathrm e}^{6 i \left (f x +e \right )} B a}{48 c^{4} f}-\frac {i {\mathrm e}^{6 i \left (f x +e \right )} a A}{16 c^{4} f}+\frac {{\mathrm e}^{4 i \left (f x +e \right )} B a}{32 c^{4} f}-\frac {3 i {\mathrm e}^{4 i \left (f x +e \right )} a A}{32 c^{4} f}+\frac {a \,{\mathrm e}^{2 i \left (f x +e \right )} B}{16 c^{4} f}-\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )} A}{16 c^{4} f}\) | \(158\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 13.34, size = 85, normalized size = 1.49 \begin {gather*} -\frac {3 \, {\left (i \, A + B\right )} a e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, {\left (3 i \, A + B\right )} a e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, {\left (3 i \, A - B\right )} a e^{\left (4 i \, f x + 4 i \, e\right )} + 12 \, {\left (i \, A - B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )}}{192 \, c^{4} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 304 vs. \(2 (46) = 92\).
time = 0.32, size = 304, normalized size = 5.33 \begin {gather*} \begin {cases} \frac {\left (- 98304 i A a c^{12} f^{3} e^{2 i e} + 98304 B a c^{12} f^{3} e^{2 i e}\right ) e^{2 i f x} + \left (- 147456 i A a c^{12} f^{3} e^{4 i e} + 49152 B a c^{12} f^{3} e^{4 i e}\right ) e^{4 i f x} + \left (- 98304 i A a c^{12} f^{3} e^{6 i e} - 32768 B a c^{12} f^{3} e^{6 i e}\right ) e^{6 i f x} + \left (- 24576 i A a c^{12} f^{3} e^{8 i e} - 24576 B a c^{12} f^{3} e^{8 i e}\right ) e^{8 i f x}}{1572864 c^{16} f^{4}} & \text {for}\: c^{16} f^{4} \neq 0 \\\frac {x \left (A a e^{8 i e} + 3 A a e^{6 i e} + 3 A a e^{4 i e} + A a e^{2 i e} - i B a e^{8 i e} - i B a e^{6 i e} + i B a e^{4 i e} + i B a e^{2 i e}\right )}{8 c^{4}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 213 vs. \(2 (47) = 94\).
time = 0.95, size = 213, normalized size = 3.74 \begin {gather*} -\frac {2 \, {\left (3 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 9 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 3 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 21 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 4 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 24 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 8 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 21 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 4 i \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 9 i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{3 \, c^{4} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.67, size = 73, normalized size = 1.28 \begin {gather*} -\frac {\frac {a\,\left (-B+A\,3{}\mathrm {i}\right )}{12}+\frac {B\,a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}{3}}{c^4\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4+{\mathrm {tan}\left (e+f\,x\right )}^3\,4{}\mathrm {i}-6\,{\mathrm {tan}\left (e+f\,x\right )}^2-\mathrm {tan}\left (e+f\,x\right )\,4{}\mathrm {i}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________